<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
	<head>
		<title><?php echo ($system_name); ?></title>
		<meta charset="UTF-8">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<!-- intoHead  -->
		<link rel="stylesheet" type="text/css" href="<?php echo C('BOOTSTRAP');?>css/bootstrap.min.css?v=<?php echo C('VERSION');?>" />
		<link rel="stylesheet" type="text/css" href="<?php echo C('HOME_CSS');?>console.css?v=<?php echo C('VERSION');?>" />
		<link rel="stylesheet" type="text/css" href="<?php echo C('HOME_CSS');?>main.min.css" />
		<script type="text/javascript" src="<?php echo C('HOME_JS');?>jquery-2.0.3.min.js?v=<?php echo C('VERSION');?>"></script>
		<script type="text/javascript" src="<?php echo C('HOME_JS');?>index.js?v=<?php echo C('VERSION');?>"></script>
		<script language="JavaScript" src="<?php echo C('LAYERUI');?>layui.js?v=<?php echo C('VERSION');?>"></script>
		<script language="JavaScript" src="<?php echo C('HOME_JS');?>function.js?v=<?php echo C('VERSION');?>"></script>
		<script>
		layui.use(['layer','form'], function(){
			var layer=layui.layer;
			var form =layui.form();
		});
		</script>
		<link rel="stylesheet" type="text/css" href="<?php echo C('HOME_CSS');?>iframe.css?v=<?php echo C('VERSION');?>" />
		<script>
			var city_url = "<?php echo C('HOME_JS');?>city.min.js";
		</script>
		<script type="text/javascript" src="<?php echo C('HOME_JS');?>jquery.cityselect.js"></script>
		<script type="text/javascript" src="<?php echo C('UPLOAD');?>jquery.form.js"></script>

	</head>
<style type="text/css">
	table{width:100%;}
	table td,table th{padding:6px 0px 6px 6px;background:#FFFFFF;}
	table th{text-align:center;line-height:30px;margin:5px;border-bottom:10px solid #f5f5f5;border-right:1px solid #DEDEDE;color:#3e3e3e;}
	table td{text-align:center;border-bottom:2px solid #DEDEDE;line-height:25px;}
	.spacess{color:#ccc;float:right;border-right:1px solid #DEDEDE;height:35px;}
	.opration{text-align: left !important;padding-left:30px;border-right:1px solid #DEDEDE;}
</style>
<body class="iframe-body">

<div style="text-indent:10px;background:#EAEDF1;width:100%;position:fixed;top:0px;height:35px;line-height:35px;">
    <a href="<?php echo U('Index/home');?>" target="right-page" style="color:#5c5c5c;text-decoration:none;">
	    <img style="position:relative;top:-2px;" src="<?php echo C('HOME_IMAGE');?>icon/sy_icon.png" width="15px;">
	    <?php echo (L("_HOME_PAGE")); ?>
    </a>
    &gt;
    <a href="<?php echo U($nav_one['action'],array('nav_id'=>$nav_one['id']));?>" target="right-page" style="color:#5c5c5c;text-decoration:none;">
    	员工管理
    </a>
    &gt;
    <a href="<?php echo U($nav_two['action'],array('nav_id'=>$nav_two['id']));?>" target="right-page" style="text-decoration:none;">
    	<span style="color:#15b6be;">获取员工信息</span>
    </a>
    <span style="float:right;margin-right:10px;cursor:pointer;" onclick="location.reload()"><?php if((LANG_SET) == "zh-cn"): ?>刷新<?php else: ?>refresh<?php endif; ?></span>
	<div style="display: inline-block;float: right;"><input id="search" value="" style="height:25px"/><a id="search_url"><span class="glyphicon glyphicon-search" style="right:30px;cursor:pointer" aria-hidden="true"></span></a></div>
</div>

<div class="body" style="background:#f5f5f5;padding-top: 45px;">
<table style="width:100%;">
	<tr>
		<th><?php echo (L("USER_ACTION")); ?></th>
		<th><?php echo (L("USER_NUM")); ?></th>
		<th><?php echo (L("USER_PIC")); ?></th>
		<th><?php echo (L("USER_NAME")); ?></th>
		<th><?php echo (L("USER_NICKNAME")); ?></th>
		<th><?php echo (L("USER_PHONE")); ?></th>
		<th><?php echo (L("USER_EMAIL")); ?></th>
		<th><?php echo (L("USER_SEX")); ?></th>
		<th><?php echo (L("USER_ACTION_DELETE")); ?></th>
	</tr>
	<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
		<td class="opration" style="">
			<a class="edits" url="<?php echo U('Yhgl/edit',array('id'=>$vo['id']));?>" href="javascript:;">
				<img title="<?php echo (L("_EDIT")); ?>" src="<?php echo C('HOME_IMAGE');?>icon/editor@2x.png" style="margin-bottom:5px;height:14px;width:auto;"/>
			</a><br/>
			<a style="display: none" class="del" data_id="<?php echo ($vo["id"]); ?>" href="javascript:;">
				<img title="<?php echo (L("_DELETE")); ?>" src="<?php echo C('HOME_IMAGE');?>icon/delete@2x.png" style="margin-bottom:5px;height:14px;width:auto;"/>
			</a>
			<!--<a class="jcbg" time="<?php echo ($vo['report_time']); ?>" uid="<?php echo ($vo['uid']); ?>" url="<?php echo ($vo['report_url']); ?>" href="javascript:;">
				<img title="<?php echo (L("YHGL_JCBG")); ?>" src="<?php echo C('HOME_IMAGE');?>icon/-report-regimen@2x.png" style="height:14px;width:auto;"/>
			</a><br/>-->
		</td>
		<td><?php echo ($vo["id"]); ?><span class="spacess"></span></td>

		<td>
			<?php if(!empty($vo["head_pic"])): ?><img class="head_pic" src="<?php echo ($vo["head_pic"]); ?>" width="50px" height="50px">
			<?php else: ?>
			<img class="head_pic" src="<?php echo C('HOME_IMAGE');?>default_user.png" width="50px" height="50px"><?php endif; ?>
			<span class="spacess"></span>
		</td>
		<td><?php echo ($vo["name"]); ?><span class="spacess"></span></td>
		<td><?php echo ($vo["nickname"]); ?><span class="spacess"></span></td>
		<td><?php echo ($vo["phone"]); ?><span class="spacess"></span></td>
		<td><?php echo ($vo["email"]); ?><span class="spacess"></span></td>
		<td>
			<?php if(($vo["sex"]) == "1"): echo (L("USER_MAN")); endif; ?>
			<?php if(($vo["sex"]) == "2"): echo (L("USER_WOMAN")); endif; ?>
			<span class="spacess"></span>
		</td>
		<td><a  class="del" data_id="<?php echo ($vo["id"]); ?>" href="javascript:;">
			<img title="<?php echo (L("_DELETE")); ?>" src="<?php echo C('HOME_IMAGE');?>icon/delete@2x.png" style="margin-bottom:5px;height:14px;width:auto;"/>
		</a></td>
		<!-- <td>
			<a class="edits" url="<?php echo U('Yhgl/edit',array('id'=>$vo['id']));?>" href="javascript:;"><?php echo (L("_EDIT")); ?></a>
			<a class="del" data_id="<?php echo ($vo["id"]); ?>" href="javascript:;"><?php echo (L("_DELETE")); ?></a>
			<a class="zlfa" url="<?php echo U('Yhgl/zlfa',array('id'=>$vo['id']));?>" href="javascript:;"><?php echo (L("YHGL_ZLFA")); ?></a>
		</td> -->
	</tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
<div class="page"><?php echo ($page); ?></div>
</div>

<script>
  function extractTime(url){
	var fields=url.split('/');
    return fields[fields.length-2];
  }
  $('.del').each(function(){
	  $(this).click(function(){
		  var id = $(this).attr('data_id');
		  var url ="<?php echo U('Yhgl/del');?>";
		  var data={id:id};
		  parent.layer.confirm('<?php echo (L("USER_DELETE")); ?>？',function(){
			  $.post(url,data,function(res){
				  parent.layer.msg(res.msg,{time:2000},function(){
					  location.reload();
				  })
			  })
		  })
	  })
  })
  $('table').on('click','.edits',function(){
		  var url = $(this).attr('url');
		  parent.layer.open({
				title:'<?php echo (L("USER_UPDATE")); ?>',
			    type: 2,
			    area: ['450px', '500px'],
			    fixed: false, //不固定
			    maxmin: true,
			    shadeClose: true,
			    content: url,
			    end:function(){
			    	location.reload();
			    }
			  });
  })
  $('table').on('click','.zlfa',function(){
	  var url =$(this).attr('url');
	  parent.layer.open({
			title:'<?php echo (L("YHGL_ADD_ZLFA")); ?>',
		    type: 2,
		    area: ['450px', '360px'],
		    fixed: false, //不固定
		    maxmin: true,
		    shadeClose: true,
		    content: url,
		    end:function(){
		    	location.reload();
		    }
		});
  })
  $('table').on('click','.lsjcbg',function(){
	  var url =$(this).attr('url');
	  var newest_re =$(this).attr('newest_re');
	  var fdStart = newest_re.indexOf("http");
	  if(fdStart == 0){
		parent.layer.open({
			title:'查看用户检测报告记录',
		    type: 2,
		    area: ['700px', '380px'],
		    fixed: false, //不固定
		    maxmin: true,
		    shadeClose: true,
		    content: url,
		    end:function(){
		    	location.reload();
		    }
		});
	  }else{
		  if(fdStart == -1){
			  parent.layer.open({
              title:'<?php echo (L("YHGL_VIEW_JCBG")); ?>',
              type: 1,
              area: ['450px', '300px'],
              fixed: false, //不固定
              maxmin: true,
              shadeClose: true,
              content: '没有该用户上传的检测报告',
              end:function(){
                  location.reload();
              }
          });
		  }
	  }

  })
  $('#search_url').on('click',function(){
	  var $key_word = $('#search').val();
	  var url = "<?php echo U('Yhgl/info',array('key_word' => $key_word));?>";
	  window.location.href = url+'?key_word='+$key_word;
  })
  $("#search").keydown(function(){
	if(event.keyCode == "13"){
		var $key_word = $('#search').val();
		var url = "<?php echo U('Yhgl/info',array('key_word' => $key_word));?>";
		window.location.href = url+'?key_word='+$key_word;
	}
  })
//   $('table').on('click','.jcbg',function(){
//       var url =$(this).attr('url');
// 	  var time =$(this).attr('time');
// 		var uid =$(this).attr('uid');
// 		var downloadUrl="<?php echo U('Api/ZyApi/download_jcbg');?>?uid="+uid;
// 	  var newDate = new Date();
// 	  newDate.setTime(time * 1000);
// 	  var date = newDate.toLocaleString();
//       var fdStart = url.indexOf("http");
// 	  var timeSpan = extractTime(url);
//       if(fdStart == 0){
//           parent.layer.open({
//               title:'<?php echo (L("YHGL_VIEW_JCBG")); ?>'+'[上传时间：'+date+']'
// 										+'<a style="margin-left:10px;" href="'
// 										+'<?php echo U("Api/ZyApi/download_jcbg");?>?uid='+uid
// 										+'">下载json数据</a>',
//               type: 2,
//               area: ['900px', '500px'],
//               fixed: false, //不固定
//               maxmin: true,
//               shadeClose: true,
//               content: url,
//               end:function(){
//                   location.reload();
//               }
//           });
//       }else if(fdStart == -1){
        //   parent.layer.open({
        //       title:'<?php echo (L("YHGL_VIEW_JCBG")); ?>',
        //       type: 1,
        //       area: ['450px', '300px'],
        //       fixed: false, //不固定
        //       maxmin: true,
        //       shadeClose: true,
        //       content: '没有该用户上传的检测报告',
        //       end:function(){
        //           location.reload();
        //       }
        //   });
//       }

//   })

//鼠标放上图片变大
big_img1();
</script>